package com.xbongbong.saas.model.impl;

import com.xbongbong.saas.domain.dao.SelectedExpressDao;
import com.xbongbong.saas.domain.entity.SelectedExpressEntity;
import com.xbongbong.saas.model.SelectedExpressModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

;

/**
 * @author wujian
 */
@Service("selectedExpressModel")
public class SelectedExpressModelImpl implements SelectedExpressModel {
    @Resource
    private SelectedExpressDao selectedExpressDao;

    @Override
    public Long insert(SelectedExpressEntity entity) {
        return selectedExpressDao.insert(entity);
    }

    @Override
    public void insertBatch(List<SelectedExpressEntity> list) {
        selectedExpressDao.insertBatch(list);
    }

    @Override
    public List<SelectedExpressEntity> findEntities(Map<String, Object> param) {
        return selectedExpressDao.findEntities(param);
    }

    @Override
    public Integer getEntityCount(Map<String, Object> param) {
        return selectedExpressDao.getEntitiesCount(param);
    }

    @Override
    public void update(SelectedExpressEntity entity) {
        selectedExpressDao.update(entity);
    }

    @Override
    public SelectedExpressEntity getByKey(Long key, String corpid) {
        return selectedExpressDao.getByKey(key, corpid);
    }

    /**
     * 批量更新删除标记
     * @param list 主键id集合
     * @param corpid
     */
    @Override
    public void updateBatchDel(List<Long> list, String corpid) {
        selectedExpressDao.updateBatchDel(list, corpid);
    }

    @Override
    public void updateBatchToDel(List<Long> list, String corpid) {
        selectedExpressDao.updateBatchToDel(list, corpid);
    }

    /**
     * 批量更新
     * @param list 主键id集合
     * @param corpid
     */
    @Override
    public void updateBatch(List<SelectedExpressEntity> list, String corpid) {
        selectedExpressDao.updateBatch(list, corpid);
    }

}
